# $Id$
# Maintainer: Jan de Groot <jgc@archlinux.org>
# Contributor: Arjan Timmerman <arjan@soulfly.nl>

pkgname=genius
pkgver=1.0.21
pkgrel=2
pkgdesc="Advanced calculator including a mathematical programming language"
arch=('i686' 'x86_64')
license=('GPL')
url="http://www.jirka.org/genius.html"
depends=('vte' 'gtksourceview2' 'mpfr' 'desktop-file-utils')
makedepends=('intltool' 'gnome-doc-utils')
options=('!makeflags')
source=(https://download.gnome.org/sources/genius/1.0/${pkgname}-${pkgver}.tar.xz)
sha256sums=('f8c06a4d0aefc1bc934e993aaf8f913451d06c2bae378da1071c3bacf39ed934')

build() {
  cd $pkgname-$pkgver
  autoreconf -fi
  ./configure --prefix=/usr --sysconfdir=/etc \
      --libexecdir=/usr/lib/genius \
      --localstatedir=/var --disable-static \
      --enable-gtksourceview --disable-scrollkeeper \
      --disable-update-mimedb
  sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
  make
}

package() {
  cd $pkgname-$pkgver
  make DESTDIR="${pkgdir}" install
}
